{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "vscode": {
     "languageId": "rust"
    }
   },
   "outputs": [],
   "source": [
    ":dep plotters = { version = \"0.3.4\", default_features = false, features = [\"evcxr\", \"all_series\", \"all_elements\"] }\n",
    "use plotters::prelude::*;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "vscode": {
     "languageId": "rust"
    }
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"\"><svg width=\"300\" height=\"100\" viewBox=\"0 0 300 100\" xmlns=\"http://www.w3.org/2000/svg\">\n",
       "<rect x=\"0\" y=\"0\" width=\"300\" height=\"100\" opacity=\"1\" fill=\"#0000FF\" stroke=\"none\"/>\n",
       "</svg>\n",
       "</div>"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "evcxr_figure((300, 100), |root| {\n",
    "    // 绘图逻辑\n",
    "    root.fill(&BLUE)?;\n",
    "    // 最后返回OK告诉Plotters画完了\n",
    "    Ok(())\n",
    "})\n"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Rust",
   "language": "rust",
   "name": "rust"
  },
  "language_info": {
   "codemirror_mode": "rust",
   "file_extension": ".rs",
   "mimetype": "text/rust",
   "name": "Rust",
   "pygment_lexer": "rust",
   "version": ""
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
